package su.order.dto;


import net.kuakao.core.base.util.SystemUtils;
import net.kuakao.core.dto.PagerDTO;
import su.order.entity.OrderEntity;
public class OrderDto extends PagerDTO {
	/** 订单类型，销售 */
	public static final int ORDER_TYPE_SALE = 1;
	/** 订单类型，退货 */
	public static final int ORDER_TYPE_BACK = 2;
	
	/** 订单状态，失效 */
	public static final int ORDER_STATUS_DISABLE = 0;
	/** 订单状态，新建 */
	public static final int ORDER_STATUS_NEW = 1;
	/** 订单状态，提交仓库 */
	public static final int ORDER_STATUS_TO_STORAGE = 2;
	/** 订单状态，已备货 */
	public static final int ORDER_STATUS_STORAGE_OK = 3;
	/** 订单状态，提交发货 */
	public static final int ORDER_STATUS_TO_SHIPMENT = 4;
	/** 订单状态，已发货 */
	public static final int ORDER_STATUS_SHIPMENT_OK = 5;
	
	/** 订单是否需要开发票，是 */
	public static final int ORDER_INVOICE_YES = 1;
	/** 订单是否需要开发票，否 */
	public static final int ORDER_INVOICE_NO = 2;
	
	/** 订单开票状态，未开票 */
	public static final int ORDER_INVOICE_STATUS_READY = 0;
	/** 订单开票状态，已开票 */
	public static final int ORDER_INVOICE_STATUS_OK = 1;
	/** 订单开票状态，已审核 */
	public static final int ORDER_INVOICE_STATUS_AUDIT = 2;
	
	/** 订单结算状态，未结算 */
	public static final int ORDER_SETTLEMENT_STATUS_READY = 0;
	/** 订单结算状态，部分结算 */
	public static final int ORDER_SETTLEMENT_STATUS_PART = 1;
	/** 订单结算状态，已结算 */
	public static final int ORDER_SETTLEMENT_STATUS_OK = 2;
	
	/*  */
	private String  id;
			
			
	/* 订单类型(1销售，2退货) */
	private String  orderType;
			
			
	/* 客户id */
	private String  customerId;
			
			
	/* 业务员id */
	private String  ywyId;
			
			
	/* 经办人 */
	private String  operator;
			
			
	/* 联系方式 */
	private String  contact;
			
			
	/* 是否需要开票(1是2否) */
	private String  invoice;
			
			
	/* 开票状态(0未开票，1已开票，2已审核) */
	private String  invoiceStatus;
			
			
	/* 税金 */
	private String  tax;
			
			
	/* 订单描述 */
	private String  odesc;
			
			
	/* 下单时间 */
	private String  orderCreateTime;
			
			
	/* 提交仓库时间 */
	private String  storageTime;
			
			
	/* 发货时间 */
	private String  shipmentTime;
			
			
	/* 订单状态(0失效，1新建，2提交仓库，3已备货，4提交发货,5已发货) */
	private String  status;
			
			
	/* 结算状态(0未结算，1部分结算，2已结算) */
	private String  settlementStatus;
			
	
	/* 运费 */
	private String  totalShipment;
			
	/* 订单总价 */
	private String  totalprice;
			
			
	/* 总提留 */
	private String  totalpayment;
			
			
	/* 总回款 */
	private String  totalpay;

	/* 用于接收页面新添加的，订单的产品信息 */
	private String orderProducts;
			

	
	public String getTotalShipment() {
		return totalShipment;
	}

	public void setTotalShipment(String totalShipment) {
		this.totalShipment = totalShipment;
	}

	public String getOrderProducts() {
		return orderProducts;
	}

	public void setOrderProducts(String orderProducts) {
		this.orderProducts = orderProducts;
	}

	public String  getId() {
		return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}
			
	public String  getOrderType() {
		return orderType;
	}
	
	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}
			
	public String  getCustomerId() {
		return customerId;
	}
	
	public void setCustomerId(String customerId) {
		this.customerId = customerId;
	}
			
	public String  getYwyId() {
		return ywyId;
	}
	
	public void setYwyId(String ywyId) {
		this.ywyId = ywyId;
	}
			
	public String  getOperator() {
		return operator;
	}
	
	public void setOperator(String operator) {
		this.operator = operator;
	}
			
	public String  getContact() {
		return contact;
	}
	
	public void setContact(String contact) {
		this.contact = contact;
	}
			
	public String  getInvoice() {
		return invoice;
	}
	
	public void setInvoice(String invoice) {
		this.invoice = invoice;
	}
			
	public String  getInvoiceStatus() {
		return invoiceStatus;
	}
	
	public void setInvoiceStatus(String invoiceStatus) {
		this.invoiceStatus = invoiceStatus;
	}
			
	public String  getTax() {
		return tax;
	}
	
	public void setTax(String tax) {
		this.tax = tax;
	}
			
	public String  getOdesc() {
		return odesc;
	}
	
	public void setOdesc(String odesc) {
		this.odesc = odesc;
	}
			
	public String  getOrderCreateTime() {
		return orderCreateTime;
	}
	
	public void setOrderCreateTime(String orderCreateTime) {
		this.orderCreateTime = orderCreateTime;
	}
			
	public String  getStorageTime() {
		return storageTime;
	}
	
	public void setStorageTime(String storageTime) {
		this.storageTime = storageTime;
	}
			
	public String  getShipmentTime() {
		return shipmentTime;
	}
	
	public void setShipmentTime(String shipmentTime) {
		this.shipmentTime = shipmentTime;
	}
			
	public String  getStatus() {
		return status;
	}
	
	public void setStatus(String status) {
		this.status = status;
	}
			
	public String  getSettlementStatus() {
		return settlementStatus;
	}
	
	public void setSettlementStatus(String settlementStatus) {
		this.settlementStatus = settlementStatus;
	}
			
	public String  getTotalprice() {
		return totalprice;
	}
	
	public void setTotalprice(String totalprice) {
		this.totalprice = totalprice;
	}
			
	public String  getTotalpayment() {
		return totalpayment;
	}
	
	public void setTotalpayment(String totalpayment) {
		this.totalpayment = totalpayment;
	}
			
	public String  getTotalpay() {
		return totalpay;
	}
	
	public void setTotalpay(String totalpay) {
		this.totalpay = totalpay;
	}
			

	public OrderEntity toOrderEntity() {
		OrderEntity orderEntity = new OrderEntity();
		orderEntity.setId(SystemUtils.strToInt(this.id));
		
		orderEntity.setOrderType(SystemUtils.strToInt(this.orderType));
		
		orderEntity.setCustomerId(SystemUtils.strToInt(this.customerId));
		
		orderEntity.setYwyId(SystemUtils.strToInt(this.ywyId));
		
		orderEntity.setOperator(this.getOperator());
		
		orderEntity.setContact(this.getContact());
		
		orderEntity.setInvoice(SystemUtils.strToInt(this.invoice));
		
		orderEntity.setInvoiceStatus(SystemUtils.strToInt(this.invoiceStatus));
		
		orderEntity.setTax(SystemUtils.strToDouble(this.tax));
		
		orderEntity.setOdesc(this.getOdesc());
		
		orderEntity.setOrderCreateTime(SystemUtils.strToDate(this.orderCreateTime,"yyyy-MM-dd"));
		
		orderEntity.setStorageTime(SystemUtils.strToDate(this.storageTime,"yyyy-MM-dd"));
		
		orderEntity.setShipmentTime(SystemUtils.strToDate(this.shipmentTime,"yyyy-MM-dd"));
		
		orderEntity.setStatus(SystemUtils.strToInt(this.status));
		
		orderEntity.setSettlementStatus(SystemUtils.strToInt(this.settlementStatus));
		
		orderEntity.setTotalprice(SystemUtils.strToDouble(this.totalprice));
		
		orderEntity.setTotalpayment(SystemUtils.strToDouble(this.totalpayment));
		
		orderEntity.setTotalpay(SystemUtils.strToDouble(this.totalpay));
		
		return orderEntity;
	}
}

